
package statistics;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import baseball.*;

public class BaseballStatistics extends JFrame 
{

	public BaseballStatistics()
	{
		initializeMethod();
		
		try{
			System.setOut(new PrintStream(new File("log.txt")));
		}catch(IOException io){
			System.err.print(io.getMessage());
		}
		Sabrmetrics b = new Sabrmetrics();
		int dwHR = 5; 
		int dwStolenBase = 10; 
		double PSN = b.PowerSpeedNumber(dwHR, dwStolenBase);
		System.out.println("PSN:" + PSN);
	}

	private void initializeMethod()
	{
		Container container=getContentPane();
		container.setLayout(new BorderLayout());

		addWindowListener(new WindowAdapter()
		{
			public void windowClosing(WindowEvent e)
			{
				dispose();
				System.exit(0);
			}
		});
	}

	public static void main(String[] sCommand)
	{
		BaseballStatistics app=new BaseballStatistics();
		app.setBounds(133,100,532,400);
		app.setTitle("BaseballStatistics");
		app.setVisible(true);
	}

}

